package day1221;

import java.util.Arrays;

public class Test3Triangle {
    public static void main(String[] args) {
        int[][] all=new int[4][7];
        for (int i = 0; i < all.length; i++) {
            int j = 0;
            for (  ; j < all.length-1-i; j++) {
                all[i][j]=32;
            }

            for ( int n = j; j <= n+2*i; j++) {
            //for ( int n = j; j <= n+3; j++) {
                //System.out.print(n+",");
                //if(j==n || j==j*2+2*i){
                if(j==n || j == n+2*i){
                    all[i][j]=1;
                }else{
                    //all[i][j]=all[i-1][j-1]+all[i-1][j+1];
                }
            }
            //System.out.println();

        }

        for (int i = 0; i < all.length; i++) {
            System.out.println(Arrays.toString(all[i]));
        }

    }
}















//    public static void main(String[] args) {
//        char[][]  poems={
//                {'离','离','原','上','草'}   ,
//                {'一','岁','一','枯','荣'}
//        };
//        System.out.println(poems[0][1]); //离
//        System.out.println(poems[0][3]); //上
//        System.out.println(poems[1][4]); //荣
//        System.out.println(poems.length);//大数组poems的长度
//    }